$(document).ready(function () {
	$('form').attr('enctype','multipart/form-data');
	$('.add_image').click(function(){
		$cantidad = $('.image_input').size();
		$('.image_input:last').after('<br><input type="file" class="image_input" name="imagenes_' + ($cantidad) + '">');
	});
	$('.remove_image').click(function(){
		$prop_id 	= $(this).attr('prop_id');
		$img_id 	= $(this).attr('img_id');
		
		$parent		= $(this).parent();
		
		$url 		= '/eliminar_foto.php';
		$.ajax({
			url : $url,
			data : {prop_id:$prop_id,img_id:$img_id},
			success : function($data){
				$parent.remove();
			},
			type : 'post'
		})
	});
});
